<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>IgH EtherCAT Master: sdo_request.c Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">IgH EtherCAT Master
   &#160;<span id="projectnumber">1.5.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('sdo__request_8c_source.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">sdo_request.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="sdo__request_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/******************************************************************************</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *  $Id: sdo_request.c,v ec403cf308eb 2013/02/12 14:46:43 fp $</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *  Copyright (C) 2006-2008  Florian Pose, Ingenieurgemeinschaft IgH</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *  This file is part of the IgH EtherCAT Master.</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> *  The IgH EtherCAT Master is free software; you can redistribute it and/or</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *  modify it under the terms of the GNU General Public License version 2, as</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> *  published by the Free Software Foundation.</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *  The IgH EtherCAT Master is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> *  but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> *  Public License for more details.</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> *  You should have received a copy of the GNU General Public License along</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> *  with the IgH EtherCAT Master; if not, write to the Free Software</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> *  ---</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment"> *  The license mentioned above concerns the source code only. Using the</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment"> *  EtherCAT technology and brand is only permitted in compliance with the</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment"> *  industrial property and similar rights of Beckhoff Automation GmbH.</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment"> *****************************************************************************/</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#include &lt;linux/module.h&gt;</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#include &lt;linux/jiffies.h&gt;</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#include &lt;linux/slab.h&gt;</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="sdo__request_8h.html">sdo_request.h</a>&quot;</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="sdo__request_8c.html#a90de0444ea60b7bb1d18233f1152b249">   46</a></span>&#160;<span class="preprocessor">#define EC_SDO_REQUEST_RESPONSE_TIMEOUT 1000</span></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="keywordtype">void</span> <a class="code" href="sdo__request_8c.html#af17eb98fdb8755c76a4500ed5be4233c">ec_sdo_request_clear_data</a>(<a class="code" href="structec__sdo__request.html">ec_sdo_request_t</a> *);</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="sdo__request_8h.html#ad8aff35de00f93957ff85baafa8fd4e7">   56</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="sdo__request_8c.html#a0e62e96b9d01ab1b89cc2df89d0ac8ef">ec_sdo_request_init</a>(</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <a class="code" href="structec__sdo__request.html">ec_sdo_request_t</a> *req </div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        )</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;{</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#a98a6142382d920ac06195dd6b6de2990">complete_access</a> = 0;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#aa1f9c68c95c5fde23ed0807abf884b08">data</a> = NULL;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#a6275d28bba5bc2a428915b717fe425e5">mem_size</a> = 0;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#a9a094314f738ed0fdf4b46f4bd37dfe9">data_size</a> = 0;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#aaccb8ada520d7948b4f61653df6e871f">dir</a> = <a class="code" href="group__ApplicationInterface.html#gga703c4e47384b3601e7605d6d910aaba1a1d65420e76eb63b731b1148054c40054">EC_DIR_INVALID</a>;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#a042249b5e1776a0c0b6fc3003ef939a2">issue_timeout</a> = 0; <span class="comment">// no timeout</span></div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#a0282ca505cf8acbbe9ecbbd1999967a9">response_timeout</a> = <a class="code" href="sdo__request_8c.html#a90de0444ea60b7bb1d18233f1152b249">EC_SDO_REQUEST_RESPONSE_TIMEOUT</a>;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#a0c50e10b80720d00f11863e76ecc1755">state</a> = EC_INT_REQUEST_INIT;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#a1119ddcb79a3deed62e3890481109030">errno</a> = 0;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#aaa992ddb3f070824088161dffb347b3e">abort_code</a> = 0x00000000;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;}</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="sdo__request_8h.html#a74443922a8e3286319551f013ca4a497">   76</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="sdo__request_8c.html#af3a555948ca6b916238e6c696d676645">ec_sdo_request_clear</a>(</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        <a class="code" href="structec__sdo__request.html">ec_sdo_request_t</a> *req </div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        )</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;{</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <a class="code" href="sdo__request_8c.html#af17eb98fdb8755c76a4500ed5be4233c">ec_sdo_request_clear_data</a>(req);</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;}</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="sdo__request_8h.html#a45646d530be29f32d4519c8dbba47426">   91</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="sdo__request_8c.html#a70e89eac4d08148fb507ec32756738b8">ec_sdo_request_copy</a>(</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        <a class="code" href="structec__sdo__request.html">ec_sdo_request_t</a> *req, </div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;        <span class="keyword">const</span> <a class="code" href="structec__sdo__request.html">ec_sdo_request_t</a> *other </div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        )</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;{</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#a98a6142382d920ac06195dd6b6de2990">complete_access</a> = other-&gt;<a class="code" href="structec__sdo__request.html#a98a6142382d920ac06195dd6b6de2990">complete_access</a>;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#ad8ef54b4c7495a17c81eabff59e079fd">index</a> = other-&gt;<a class="code" href="structec__sdo__request.html#ad8ef54b4c7495a17c81eabff59e079fd">index</a>;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#af3b7a335ce659260bed0d04f90ba9e4a">subindex</a> = other-&gt;<a class="code" href="structec__sdo__request.html#af3b7a335ce659260bed0d04f90ba9e4a">subindex</a>;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="sdo__request_8c.html#af41428fb76fbb3a2bcf14a269a265476">ec_sdo_request_copy_data</a>(req, other-&gt;<a class="code" href="structec__sdo__request.html#aa1f9c68c95c5fde23ed0807abf884b08">data</a>, other-&gt;<a class="code" href="structec__sdo__request.html#a9a094314f738ed0fdf4b46f4bd37dfe9">data_size</a>);</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;}</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div><div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="sdo__request_8c.html#af17eb98fdb8755c76a4500ed5be4233c">  106</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="sdo__request_8c.html#af17eb98fdb8755c76a4500ed5be4233c">ec_sdo_request_clear_data</a>(</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        <a class="code" href="structec__sdo__request.html">ec_sdo_request_t</a> *req </div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;        )</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;{</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    <span class="keywordflow">if</span> (req-&gt;<a class="code" href="structec__sdo__request.html#aa1f9c68c95c5fde23ed0807abf884b08">data</a>) {</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        kfree(req-&gt;<a class="code" href="structec__sdo__request.html#aa1f9c68c95c5fde23ed0807abf884b08">data</a>);</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        req-&gt;<a class="code" href="structec__sdo__request.html#aa1f9c68c95c5fde23ed0807abf884b08">data</a> = NULL;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    }</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#a6275d28bba5bc2a428915b717fe425e5">mem_size</a> = 0;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#a9a094314f738ed0fdf4b46f4bd37dfe9">data_size</a> = 0;</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;}</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="sdo__request_8h.html#a231aeb547727a89b100f02284637f8d6">  127</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="sdo__request_8c.html#a2f1e920bf54c7826a9747beae685caf4">ec_sdo_request_alloc</a>(</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;        <a class="code" href="structec__sdo__request.html">ec_sdo_request_t</a> *req, </div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;        <span class="keywordtype">size_t</span> size </div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        )</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;{</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <span class="keywordflow">if</span> (size &lt;= req-&gt;mem_size)</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;        <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    <a class="code" href="sdo__request_8c.html#af17eb98fdb8755c76a4500ed5be4233c">ec_sdo_request_clear_data</a>(req);</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    <span class="keywordflow">if</span> (!(req-&gt;<a class="code" href="structec__sdo__request.html#aa1f9c68c95c5fde23ed0807abf884b08">data</a> = (uint8_t *) kmalloc(size, GFP_KERNEL))) {</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        <a class="code" href="globals_8h.html#aed23297031f2f23bb5d005bb586790cf">EC_ERR</a>(<span class="stringliteral">&quot;Failed to allocate %zu bytes of SDO memory.\n&quot;</span>, size);</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        <span class="keywordflow">return</span> -ENOMEM;</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    }</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#a6275d28bba5bc2a428915b717fe425e5">mem_size</a> = size;</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#a9a094314f738ed0fdf4b46f4bd37dfe9">data_size</a> = 0;</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;}</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;</div><div class="line"><a name="l00156"></a><span class="lineno"><a class="line" href="sdo__request_8h.html#a0aaf97fcc7f73f88d76a44e8d12499c2">  156</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="sdo__request_8c.html#af41428fb76fbb3a2bcf14a269a265476">ec_sdo_request_copy_data</a>(</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        <a class="code" href="structec__sdo__request.html">ec_sdo_request_t</a> *req, </div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;        <span class="keyword">const</span> uint8_t *source, </div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        <span class="keywordtype">size_t</span> size </div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        )</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;{</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    <span class="keywordtype">int</span> ret = <a class="code" href="sdo__request_8c.html#a2f1e920bf54c7826a9747beae685caf4">ec_sdo_request_alloc</a>(req, size);</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    <span class="keywordflow">if</span> (ret &lt; 0)</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;        <span class="keywordflow">return</span> ret;</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    memcpy(req-&gt;<a class="code" href="structec__sdo__request.html#aa1f9c68c95c5fde23ed0807abf884b08">data</a>, source, size);</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#a9a094314f738ed0fdf4b46f4bd37dfe9">data_size</a> = size;</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;    <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;}</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;</div><div class="line"><a name="l00177"></a><span class="lineno"><a class="line" href="sdo__request_8h.html#aeb06bad8f9b2fb2379b274c2bb3d7b69">  177</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="sdo__request_8c.html#a4cf7dda2b74244c093448636f7584d60">ec_sdo_request_timed_out</a>(<span class="keyword">const</span> <a class="code" href="structec__sdo__request.html">ec_sdo_request_t</a> *req )</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;{</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    <span class="keywordflow">return</span> req-&gt;<a class="code" href="structec__sdo__request.html#a042249b5e1776a0c0b6fc3003ef939a2">issue_timeout</a></div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;        &amp;&amp; jiffies - req-&gt;<a class="code" href="structec__sdo__request.html#aa5be223c362a630833451bd57471a05f">jiffies_start</a> &gt; HZ * req-&gt;<a class="code" href="structec__sdo__request.html#a042249b5e1776a0c0b6fc3003ef939a2">issue_timeout</a> / 1000;</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;}</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;<span class="comment">/*****************************************************************************</span></div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;<span class="comment"> * Application interface.</span></div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;<span class="comment"> ****************************************************************************/</span></div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;</div><div class="line"><a name="l00187"></a><span class="lineno"><a class="line" href="group__ApplicationInterface.html#gae002eb267f69d91de0c83a5f4f349372">  187</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ApplicationInterface.html#gae002eb267f69d91de0c83a5f4f349372">ecrt_sdo_request_index</a>(<a class="code" href="structec__sdo__request.html">ec_sdo_request_t</a> *req, uint16_t index,</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;        uint8_t subindex)</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;{</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#ad8ef54b4c7495a17c81eabff59e079fd">index</a> = index;</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#af3b7a335ce659260bed0d04f90ba9e4a">subindex</a> = subindex;</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;}</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;</div><div class="line"><a name="l00196"></a><span class="lineno"><a class="line" href="group__ApplicationInterface.html#gae5018a122570d50568b32211d79f00ff">  196</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ApplicationInterface.html#gae5018a122570d50568b32211d79f00ff">ecrt_sdo_request_timeout</a>(<a class="code" href="structec__sdo__request.html">ec_sdo_request_t</a> *req, uint32_t timeout)</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;{</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#a042249b5e1776a0c0b6fc3003ef939a2">issue_timeout</a> = timeout;</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;}</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;</div><div class="line"><a name="l00203"></a><span class="lineno"><a class="line" href="group__ApplicationInterface.html#ga70b875084a32b81579bf83c960390967">  203</a></span>&#160;uint8_t *<a class="code" href="group__ApplicationInterface.html#ga70b875084a32b81579bf83c960390967">ecrt_sdo_request_data</a>(<a class="code" href="structec__sdo__request.html">ec_sdo_request_t</a> *req)</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;{</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    <span class="keywordflow">return</span> req-&gt;<a class="code" href="structec__sdo__request.html#aa1f9c68c95c5fde23ed0807abf884b08">data</a>;</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;}</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;</div><div class="line"><a name="l00210"></a><span class="lineno"><a class="line" href="group__ApplicationInterface.html#ga8de1a948ed0cfa5a9478d2050c2560da">  210</a></span>&#160;<span class="keywordtype">size_t</span> <a class="code" href="group__ApplicationInterface.html#ga8de1a948ed0cfa5a9478d2050c2560da">ecrt_sdo_request_data_size</a>(<span class="keyword">const</span> <a class="code" href="structec__sdo__request.html">ec_sdo_request_t</a> *req)</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;{</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;    <span class="keywordflow">return</span> req-&gt;<a class="code" href="structec__sdo__request.html#a9a094314f738ed0fdf4b46f4bd37dfe9">data_size</a>;</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;}</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;</div><div class="line"><a name="l00217"></a><span class="lineno"><a class="line" href="group__ApplicationInterface.html#ga78d910487f583e333cdf978b4f12c3c1">  217</a></span>&#160;<a class="code" href="group__ApplicationInterface.html#gae94149f829f04960c62d63764a7779df">ec_request_state_t</a> <a class="code" href="group__ApplicationInterface.html#ga78d910487f583e333cdf978b4f12c3c1">ecrt_sdo_request_state</a>(<span class="keyword">const</span> <a class="code" href="structec__sdo__request.html">ec_sdo_request_t</a> *req)</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;{</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;   <span class="keywordflow">return</span> <a class="code" href="globals_8h.html#a3a9e581016f6c49ce672ccd2784c0b50">ec_request_state_translation_table</a>[req-&gt;<a class="code" href="structec__sdo__request.html#a0c50e10b80720d00f11863e76ecc1755">state</a>];</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;}</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;</div><div class="line"><a name="l00224"></a><span class="lineno"><a class="line" href="group__ApplicationInterface.html#ga883e43ca2b29e73ac5ec5dec214487b2">  224</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ApplicationInterface.html#ga883e43ca2b29e73ac5ec5dec214487b2">ecrt_sdo_request_read</a>(<a class="code" href="structec__sdo__request.html">ec_sdo_request_t</a> *req)</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;{</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#aaccb8ada520d7948b4f61653df6e871f">dir</a> = <a class="code" href="group__ApplicationInterface.html#gga703c4e47384b3601e7605d6d910aaba1a6b3c6b53010076d846724fec434512e4">EC_DIR_INPUT</a>;</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#a0c50e10b80720d00f11863e76ecc1755">state</a> = EC_INT_REQUEST_QUEUED;</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#a1119ddcb79a3deed62e3890481109030">errno</a> = 0;</div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#aaa992ddb3f070824088161dffb347b3e">abort_code</a> = 0x00000000;</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#aa5be223c362a630833451bd57471a05f">jiffies_start</a> = jiffies;</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;}</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;</div><div class="line"><a name="l00235"></a><span class="lineno"><a class="line" href="group__ApplicationInterface.html#gaf0e5a35aa54d971d75a6d00c148ffa83">  235</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ApplicationInterface.html#gaf0e5a35aa54d971d75a6d00c148ffa83">ecrt_sdo_request_write</a>(<a class="code" href="structec__sdo__request.html">ec_sdo_request_t</a> *req)</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;{</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#aaccb8ada520d7948b4f61653df6e871f">dir</a> = <a class="code" href="group__ApplicationInterface.html#gga703c4e47384b3601e7605d6d910aaba1aebf26f1d5c09cf002af5b09d9cb59b78">EC_DIR_OUTPUT</a>;</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#a0c50e10b80720d00f11863e76ecc1755">state</a> = EC_INT_REQUEST_QUEUED;</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#a1119ddcb79a3deed62e3890481109030">errno</a> = 0;</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#aaa992ddb3f070824088161dffb347b3e">abort_code</a> = 0x00000000;</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;    req-&gt;<a class="code" href="structec__sdo__request.html#aa5be223c362a630833451bd57471a05f">jiffies_start</a> = jiffies;</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;}</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;EXPORT_SYMBOL(<a class="code" href="group__ApplicationInterface.html#gae002eb267f69d91de0c83a5f4f349372">ecrt_sdo_request_index</a>);</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;EXPORT_SYMBOL(<a class="code" href="group__ApplicationInterface.html#gae5018a122570d50568b32211d79f00ff">ecrt_sdo_request_timeout</a>);</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;EXPORT_SYMBOL(<a class="code" href="group__ApplicationInterface.html#ga70b875084a32b81579bf83c960390967">ecrt_sdo_request_data</a>);</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;EXPORT_SYMBOL(<a class="code" href="group__ApplicationInterface.html#ga8de1a948ed0cfa5a9478d2050c2560da">ecrt_sdo_request_data_size</a>);</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;EXPORT_SYMBOL(<a class="code" href="group__ApplicationInterface.html#ga78d910487f583e333cdf978b4f12c3c1">ecrt_sdo_request_state</a>);</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;EXPORT_SYMBOL(<a class="code" href="group__ApplicationInterface.html#ga883e43ca2b29e73ac5ec5dec214487b2">ecrt_sdo_request_read</a>);</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;EXPORT_SYMBOL(<a class="code" href="group__ApplicationInterface.html#gaf0e5a35aa54d971d75a6d00c148ffa83">ecrt_sdo_request_write</a>);</div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="ttc" id="structec__sdo__request_html"><div class="ttname"><a href="structec__sdo__request.html">ec_sdo_request</a></div><div class="ttdoc">CANopen SDO request. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8h_source.html#l00048">sdo_request.h:48</a></div></div>
<div class="ttc" id="structec__sdo__request_html_a0c50e10b80720d00f11863e76ecc1755"><div class="ttname"><a href="structec__sdo__request.html#a0c50e10b80720d00f11863e76ecc1755">ec_sdo_request::state</a></div><div class="ttdeci">ec_internal_request_state_t state</div><div class="ttdoc">SDO request state. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8h_source.html#l00063">sdo_request.h:63</a></div></div>
<div class="ttc" id="structec__sdo__request_html_a0282ca505cf8acbbe9ecbbd1999967a9"><div class="ttname"><a href="structec__sdo__request.html#a0282ca505cf8acbbe9ecbbd1999967a9">ec_sdo_request::response_timeout</a></div><div class="ttdeci">uint32_t response_timeout</div><div class="ttdoc">Maximum time in ms, the transfer is retried, if the slave does not respond. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8h_source.html#l00058">sdo_request.h:58</a></div></div>
<div class="ttc" id="structec__sdo__request_html_a6275d28bba5bc2a428915b717fe425e5"><div class="ttname"><a href="structec__sdo__request.html#a6275d28bba5bc2a428915b717fe425e5">ec_sdo_request::mem_size</a></div><div class="ttdeci">size_t mem_size</div><div class="ttdoc">Size of SDO data memory. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8h_source.html#l00053">sdo_request.h:53</a></div></div>
<div class="ttc" id="structec__sdo__request_html_ad8ef54b4c7495a17c81eabff59e079fd"><div class="ttname"><a href="structec__sdo__request.html#ad8ef54b4c7495a17c81eabff59e079fd">ec_sdo_request::index</a></div><div class="ttdeci">uint16_t index</div><div class="ttdoc">SDO index. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8h_source.html#l00050">sdo_request.h:50</a></div></div>
<div class="ttc" id="structec__sdo__request_html_aaa992ddb3f070824088161dffb347b3e"><div class="ttname"><a href="structec__sdo__request.html#aaa992ddb3f070824088161dffb347b3e">ec_sdo_request::abort_code</a></div><div class="ttdeci">uint32_t abort_code</div><div class="ttdoc">SDO request abort code. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8h_source.html#l00068">sdo_request.h:68</a></div></div>
<div class="ttc" id="sdo__request_8c_html_af17eb98fdb8755c76a4500ed5be4233c"><div class="ttname"><a href="sdo__request_8c.html#af17eb98fdb8755c76a4500ed5be4233c">ec_sdo_request_clear_data</a></div><div class="ttdeci">void ec_sdo_request_clear_data(ec_sdo_request_t *)</div><div class="ttdoc">SDO request destructor. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8c_source.html#l00106">sdo_request.c:106</a></div></div>
<div class="ttc" id="sdo__request_8c_html_a4cf7dda2b74244c093448636f7584d60"><div class="ttname"><a href="sdo__request_8c.html#a4cf7dda2b74244c093448636f7584d60">ec_sdo_request_timed_out</a></div><div class="ttdeci">int ec_sdo_request_timed_out(const ec_sdo_request_t *req)</div><div class="ttdoc">Checks, if the timeout was exceeded. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8c_source.html#l00177">sdo_request.c:177</a></div></div>
<div class="ttc" id="structec__sdo__request_html_aa1f9c68c95c5fde23ed0807abf884b08"><div class="ttname"><a href="structec__sdo__request.html#aa1f9c68c95c5fde23ed0807abf884b08">ec_sdo_request::data</a></div><div class="ttdeci">uint8_t * data</div><div class="ttdoc">Pointer to SDO data. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8h_source.html#l00052">sdo_request.h:52</a></div></div>
<div class="ttc" id="group__ApplicationInterface_html_gae5018a122570d50568b32211d79f00ff"><div class="ttname"><a href="group__ApplicationInterface.html#gae5018a122570d50568b32211d79f00ff">ecrt_sdo_request_timeout</a></div><div class="ttdeci">void ecrt_sdo_request_timeout(ec_sdo_request_t *req, uint32_t timeout)</div><div class="ttdoc">Set the timeout for an SDO request. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8c_source.html#l00196">sdo_request.c:196</a></div></div>
<div class="ttc" id="group__ApplicationInterface_html_ga70b875084a32b81579bf83c960390967"><div class="ttname"><a href="group__ApplicationInterface.html#ga70b875084a32b81579bf83c960390967">ecrt_sdo_request_data</a></div><div class="ttdeci">uint8_t * ecrt_sdo_request_data(ec_sdo_request_t *req)</div><div class="ttdoc">Access to the SDO request&amp;#39;s data. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8c_source.html#l00203">sdo_request.c:203</a></div></div>
<div class="ttc" id="structec__sdo__request_html_aaccb8ada520d7948b4f61653df6e871f"><div class="ttname"><a href="structec__sdo__request.html#aaccb8ada520d7948b4f61653df6e871f">ec_sdo_request::dir</a></div><div class="ttdeci">ec_direction_t dir</div><div class="ttdoc">Direction. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8h_source.html#l00060">sdo_request.h:60</a></div></div>
<div class="ttc" id="group__ApplicationInterface_html_ga883e43ca2b29e73ac5ec5dec214487b2"><div class="ttname"><a href="group__ApplicationInterface.html#ga883e43ca2b29e73ac5ec5dec214487b2">ecrt_sdo_request_read</a></div><div class="ttdeci">void ecrt_sdo_request_read(ec_sdo_request_t *req)</div><div class="ttdoc">Schedule an SDO read operation. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8c_source.html#l00224">sdo_request.c:224</a></div></div>
<div class="ttc" id="sdo__request_8c_html_af3a555948ca6b916238e6c696d676645"><div class="ttname"><a href="sdo__request_8c.html#af3a555948ca6b916238e6c696d676645">ec_sdo_request_clear</a></div><div class="ttdeci">void ec_sdo_request_clear(ec_sdo_request_t *req)</div><div class="ttdoc">SDO request destructor. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8c_source.html#l00076">sdo_request.c:76</a></div></div>
<div class="ttc" id="sdo__request_8c_html_af41428fb76fbb3a2bcf14a269a265476"><div class="ttname"><a href="sdo__request_8c.html#af41428fb76fbb3a2bcf14a269a265476">ec_sdo_request_copy_data</a></div><div class="ttdeci">int ec_sdo_request_copy_data(ec_sdo_request_t *req, const uint8_t *source, size_t size)</div><div class="ttdoc">Copies SDO data from an external source. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8c_source.html#l00156">sdo_request.c:156</a></div></div>
<div class="ttc" id="sdo__request_8h_html"><div class="ttname"><a href="sdo__request_8h.html">sdo_request.h</a></div><div class="ttdoc">EtherCAT CANopen SDO request structure. </div></div>
<div class="ttc" id="sdo__request_8c_html_a70e89eac4d08148fb507ec32756738b8"><div class="ttname"><a href="sdo__request_8c.html#a70e89eac4d08148fb507ec32756738b8">ec_sdo_request_copy</a></div><div class="ttdeci">int ec_sdo_request_copy(ec_sdo_request_t *req, const ec_sdo_request_t *other)</div><div class="ttdoc">Copy another SDO request. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8c_source.html#l00091">sdo_request.c:91</a></div></div>
<div class="ttc" id="structec__sdo__request_html_a1119ddcb79a3deed62e3890481109030"><div class="ttname"><a href="structec__sdo__request.html#a1119ddcb79a3deed62e3890481109030">ec_sdo_request::errno</a></div><div class="ttdeci">int errno</div><div class="ttdoc">Error number. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8h_source.html#l00067">sdo_request.h:67</a></div></div>
<div class="ttc" id="sdo__request_8c_html_a90de0444ea60b7bb1d18233f1152b249"><div class="ttname"><a href="sdo__request_8c.html#a90de0444ea60b7bb1d18233f1152b249">EC_SDO_REQUEST_RESPONSE_TIMEOUT</a></div><div class="ttdeci">#define EC_SDO_REQUEST_RESPONSE_TIMEOUT</div><div class="ttdoc">Default timeout in ms to wait for SDO transfer responses. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8c_source.html#l00046">sdo_request.c:46</a></div></div>
<div class="ttc" id="group__ApplicationInterface_html_gga703c4e47384b3601e7605d6d910aaba1a6b3c6b53010076d846724fec434512e4"><div class="ttname"><a href="group__ApplicationInterface.html#gga703c4e47384b3601e7605d6d910aaba1a6b3c6b53010076d846724fec434512e4">EC_DIR_INPUT</a></div><div class="ttdoc">Values read by the master. </div><div class="ttdef"><b>Definition:</b> <a href="ecrt_8h_source.html#l00420">ecrt.h:420</a></div></div>
<div class="ttc" id="group__ApplicationInterface_html_ga78d910487f583e333cdf978b4f12c3c1"><div class="ttname"><a href="group__ApplicationInterface.html#ga78d910487f583e333cdf978b4f12c3c1">ecrt_sdo_request_state</a></div><div class="ttdeci">ec_request_state_t ecrt_sdo_request_state(const ec_sdo_request_t *req)</div><div class="ttdoc">Get the current state of the SDO request. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8c_source.html#l00217">sdo_request.c:217</a></div></div>
<div class="ttc" id="structec__sdo__request_html_af3b7a335ce659260bed0d04f90ba9e4a"><div class="ttname"><a href="structec__sdo__request.html#af3b7a335ce659260bed0d04f90ba9e4a">ec_sdo_request::subindex</a></div><div class="ttdeci">uint8_t subindex</div><div class="ttdoc">SDO subindex. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8h_source.html#l00051">sdo_request.h:51</a></div></div>
<div class="ttc" id="structec__sdo__request_html_a9a094314f738ed0fdf4b46f4bd37dfe9"><div class="ttname"><a href="structec__sdo__request.html#a9a094314f738ed0fdf4b46f4bd37dfe9">ec_sdo_request::data_size</a></div><div class="ttdeci">size_t data_size</div><div class="ttdoc">Size of SDO data. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8h_source.html#l00054">sdo_request.h:54</a></div></div>
<div class="ttc" id="group__ApplicationInterface_html_ga8de1a948ed0cfa5a9478d2050c2560da"><div class="ttname"><a href="group__ApplicationInterface.html#ga8de1a948ed0cfa5a9478d2050c2560da">ecrt_sdo_request_data_size</a></div><div class="ttdeci">size_t ecrt_sdo_request_data_size(const ec_sdo_request_t *req)</div><div class="ttdoc">Returns the current SDO data size. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8c_source.html#l00210">sdo_request.c:210</a></div></div>
<div class="ttc" id="group__ApplicationInterface_html_gga703c4e47384b3601e7605d6d910aaba1a1d65420e76eb63b731b1148054c40054"><div class="ttname"><a href="group__ApplicationInterface.html#gga703c4e47384b3601e7605d6d910aaba1a1d65420e76eb63b731b1148054c40054">EC_DIR_INVALID</a></div><div class="ttdoc">Invalid direction. </div><div class="ttdef"><b>Definition:</b> <a href="ecrt_8h_source.html#l00418">ecrt.h:418</a></div></div>
<div class="ttc" id="sdo__request_8c_html_a0e62e96b9d01ab1b89cc2df89d0ac8ef"><div class="ttname"><a href="sdo__request_8c.html#a0e62e96b9d01ab1b89cc2df89d0ac8ef">ec_sdo_request_init</a></div><div class="ttdeci">void ec_sdo_request_init(ec_sdo_request_t *req)</div><div class="ttdoc">SDO request constructor. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8c_source.html#l00056">sdo_request.c:56</a></div></div>
<div class="ttc" id="globals_8h_html_aed23297031f2f23bb5d005bb586790cf"><div class="ttname"><a href="globals_8h.html#aed23297031f2f23bb5d005bb586790cf">EC_ERR</a></div><div class="ttdeci">#define EC_ERR(fmt, args...)</div><div class="ttdoc">Convenience macro for printing EtherCAT-specific errors to syslog. </div><div class="ttdef"><b>Definition:</b> <a href="globals_8h_source.html#l00227">globals.h:227</a></div></div>
<div class="ttc" id="group__ApplicationInterface_html_gae94149f829f04960c62d63764a7779df"><div class="ttname"><a href="group__ApplicationInterface.html#gae94149f829f04960c62d63764a7779df">ec_request_state_t</a></div><div class="ttdeci">ec_request_state_t</div><div class="ttdoc">Request state. </div><div class="ttdef"><b>Definition:</b> <a href="ecrt_8h_source.html#l00517">ecrt.h:517</a></div></div>
<div class="ttc" id="sdo__request_8c_html_a2f1e920bf54c7826a9747beae685caf4"><div class="ttname"><a href="sdo__request_8c.html#a2f1e920bf54c7826a9747beae685caf4">ec_sdo_request_alloc</a></div><div class="ttdeci">int ec_sdo_request_alloc(ec_sdo_request_t *req, size_t size)</div><div class="ttdoc">Pre-allocates the data memory. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8c_source.html#l00127">sdo_request.c:127</a></div></div>
<div class="ttc" id="group__ApplicationInterface_html_gga703c4e47384b3601e7605d6d910aaba1aebf26f1d5c09cf002af5b09d9cb59b78"><div class="ttname"><a href="group__ApplicationInterface.html#gga703c4e47384b3601e7605d6d910aaba1aebf26f1d5c09cf002af5b09d9cb59b78">EC_DIR_OUTPUT</a></div><div class="ttdoc">Values written by the master. </div><div class="ttdef"><b>Definition:</b> <a href="ecrt_8h_source.html#l00419">ecrt.h:419</a></div></div>
<div class="ttc" id="globals_8h_html_a3a9e581016f6c49ce672ccd2784c0b50"><div class="ttname"><a href="globals_8h.html#a3a9e581016f6c49ce672ccd2784c0b50">ec_request_state_translation_table</a></div><div class="ttdeci">const ec_request_state_t ec_request_state_translation_table[]</div><div class="ttdoc">Global request state type translation table. </div><div class="ttdef"><b>Definition:</b> <a href="module_8c_source.html#l00651">module.c:651</a></div></div>
<div class="ttc" id="structec__sdo__request_html_a042249b5e1776a0c0b6fc3003ef939a2"><div class="ttname"><a href="structec__sdo__request.html#a042249b5e1776a0c0b6fc3003ef939a2">ec_sdo_request::issue_timeout</a></div><div class="ttdeci">uint32_t issue_timeout</div><div class="ttdoc">Maximum time in ms, the processing of the request may take. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8h_source.html#l00056">sdo_request.h:56</a></div></div>
<div class="ttc" id="group__ApplicationInterface_html_gaf0e5a35aa54d971d75a6d00c148ffa83"><div class="ttname"><a href="group__ApplicationInterface.html#gaf0e5a35aa54d971d75a6d00c148ffa83">ecrt_sdo_request_write</a></div><div class="ttdeci">void ecrt_sdo_request_write(ec_sdo_request_t *req)</div><div class="ttdoc">Schedule an SDO write operation. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8c_source.html#l00235">sdo_request.c:235</a></div></div>
<div class="ttc" id="structec__sdo__request_html_aa5be223c362a630833451bd57471a05f"><div class="ttname"><a href="structec__sdo__request.html#aa5be223c362a630833451bd57471a05f">ec_sdo_request::jiffies_start</a></div><div class="ttdeci">unsigned long jiffies_start</div><div class="ttdoc">Jiffies, when the request was issued. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8h_source.html#l00064">sdo_request.h:64</a></div></div>
<div class="ttc" id="structec__sdo__request_html_a98a6142382d920ac06195dd6b6de2990"><div class="ttname"><a href="structec__sdo__request.html#a98a6142382d920ac06195dd6b6de2990">ec_sdo_request::complete_access</a></div><div class="ttdeci">uint8_t complete_access</div><div class="ttdoc">SDO shall be transferred completely. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8h_source.html#l00055">sdo_request.h:55</a></div></div>
<div class="ttc" id="group__ApplicationInterface_html_gae002eb267f69d91de0c83a5f4f349372"><div class="ttname"><a href="group__ApplicationInterface.html#gae002eb267f69d91de0c83a5f4f349372">ecrt_sdo_request_index</a></div><div class="ttdeci">void ecrt_sdo_request_index(ec_sdo_request_t *req, uint16_t index, uint8_t subindex)</div><div class="ttdoc">Set the SDO index and subindex. </div><div class="ttdef"><b>Definition:</b> <a href="sdo__request_8c_source.html#l00187">sdo_request.c:187</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_c1346cf4828efdd0d2baf0d391d01b77.html">master</a></li><li class="navelem"><a class="el" href="sdo__request_8c.html">sdo_request.c</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
